import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
let store = new Vuex.Store({
  state:{
    count:100,
    aaaa:'aaaa',
    username:''
  },
  mutations :{
    addCount(state,arg){
      this.state.count = arg;
    },
    setUserName(state,username){
      state.username = username
    }
  },
  actions:{},
  getters:{
    getUserName(){
      return localStorage.getItem('username')
    }
  }
})

export default store;
